import java.io.*;
public class test2 {
    public static void main(String[] args) {
        File file = new File("E.java");
        File tempFile = new File("temp.tet");
        try {
            FileReader inone =new FileReader(file);
            BufferedReader intwo=new BufferedReader(inone);
            FileWriter tofile=new FileWriter(tempFile);
            BufferedWriter out =new BufferedWriter(tofile);
            String  s=null;
            int i=0;
            s=intwo.readLine();
            while (s!=null){
                i++;
                out.write(i+" "+s);
                out.newLine();
                s=intwo.readLine();
            }
            inone.close();
            intwo.close();
            out.flush();;
            out.close();
            tofile.close();
        }
        catch (IOException E) {

        }

    }
}